import request from "../utils/request";

// 菜单列表请求接口
export const powerIndex = (data?: any) => {
  return new Promise(resolve => {
    request({
      url: "/pcapi/power/rule_list", // url
      params: data
    }).then(res => {
      // 成功回调
      resolve(res);
    });
  });
};

// 菜单添加请求接口
export const powerAdd = (data?: any) => {
  return new Promise(resolve => {
    request({
      url: "/pcapi/power/rule_add", // url
      params: data
    }).then(res => {
      // 成功回调
      resolve(res);
    });
  });
};
// 菜单编辑请求接口
export const powerEdits = (data?: any) => {
  return new Promise(resolve => {
    request({
      url: "/pcapi/power/rule_update", // url
      params: data
    }).then(res => {
      // 成功回调
      resolve(res);
    });
  });
};
// 菜单删除请求接口
export const powerDeletes = (data?: any) => {
  return new Promise(resolve => {
    request({
      url: "/pcapi/power/rule_del", // url
      params: data
    }).then(res => {
      // 成功回调
      resolve(res);
    });
  });
};
